<?php
$this->load->model('commonmodel');
$toplink=$this->commonmodel->get_menulinks('toplink');
$mainlink=$this->commonmodel->get_menulinks('mainlink');
/*echo "ss";
  print_r($reviews);*/
?>
<div id="topbar">
  <div id="logo"><img src="<?php echo base_url(); ?>images/logo.jpg" width="231" height="101" /></div>
  <a href="<?php echo base_url(); ?>index/lang/en"><img src="<?php echo base_url(); ?>images/uk_flag.gif" /></a> &nbsp; <a href="<?php echo base_url(); ?>index/lang/de"><img src="<?php echo base_url(); ?>images/german_flag.gif" /></a>
  <div id="menu1"><ul>
        <?php foreach ($toplink as $key => $val) : ?>
        <li><a href="<?php echo base_url(); ?>/pages/links/<?php echo $val['id']?>/<?php echo $val['seo_friendly_url']?>"><?php echo $val['link_text']?></a></li>
        <?php endforeach; ?>        
      </ul></div>
  <div id="menu2"><ul>
        <li><a href="<?php echo base_url(); ?>">HOME</a></li>
        <?php foreach ($mainlink as $key => $val) : 
            switch (strtoupper($val['link_text'])){
            case 'ACCOMODATION':
                $url = base_url()."/hotel/list_hotels/Beach-Hotel/acc_id/1/asc";
                break;            
            default :
                $url = base_url()."/pages/links/".$val['id']."/".$val['seo_friendly_url'];
                break;
            }
            ?>
        <li><a href="<?php echo $url; ?>"><?php echo strtoupper($val['link_text'])?></a></li>
        <?php endforeach; ?>
      </ul></div>
</div>